package com.cf;

import com.cf.sheduler.MyScheduler;
import org.quartz.SchedulerException;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

/**
 * @author Administrator
 */
@SpringBootApplication
public class UploadApplication extends SpringBootServletInitializer {

    public static void main(String[] args) throws InterruptedException, SchedulerException {
        SpringApplication.run(UploadApplication.class, args);
        //执行定时任务
        MyScheduler.schedulerTask();
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(UploadApplication.class);
    }

}
